﻿using System.Runtime.Serialization;
using Hopscotch.Domain.Common;
using Hopscotch.Domain.Common.Enums;
using Newtonsoft.Json;

namespace Hopscotch.Domain.Finance
{
    [JsonObject(ItemTypeNameHandling = TypeNameHandling.Auto)]
    public abstract partial class Instrument : IEnquiryEntity<int>
    {
        [DataMember]
        public abstract string Symbol { get; set; }

        public virtual InstrumentType InstrumentType
        {
            get
            {
                return _type ?? InstrumentType.NA; 
            }
        }
    }
}
